-- GENERATED SPELL FOR [Woodpaw Trapper] --


function spell0_5251(pUnit, Event) --@Net,n/a--
pUnit:FullCastSpellOnTarget(6533,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5251', 2299, 1)
end

function spell1_5251(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(6660,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5251', 597, 1)
end

function Sorts_5251(pUnit, Event)
local choix_sorts_5251 = math.random(0, 1)
if choix_sorts_5251 == 0 then
pUnit:RegisterEvent('spell0_5251', 1, 1)
end
if choix_sorts_5251 == 1 then
pUnit:RegisterEvent('spell1_5251', 1, 1)
end
end

function mob5251_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5251', math.random(1500, 3000), 1)
end

function mob5251_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5251_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5251_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5251, 1, 'mob5251_Action')
RegisterUnitEvent(5251, 2, 'mob5251_Leave')
RegisterUnitEvent(5251, 3, 'mob5251_Kill')
RegisterUnitEvent(5251, 4, 'mob5251_Die')
